package com.xueshishasha.oa.business.Delegate
{
	import com.adobe.cairngorm.business.ServiceLocator;
	import com.xueshishasha.oa.VO.Employee;
	import com.xueshishasha.oa.VO.PaginationParas;
	
	import mx.rpc.AsyncToken;
	import mx.rpc.IResponder;
	
	public class EmployeeDelegate
	{
		public var responder:IResponder = null;
		public var serviceLocator:ServiceLocator = ServiceLocator.getInstance();
		
		
		public function EmployeeDelegate(responder:IResponder)
		{
			this.responder = responder;
		}
		
		public function EmployeeLogin(e:Employee):void{
			
			var token:AsyncToken = serviceLocator.getRemoteObject("employeeService").authentication(e);
			token.addResponder(this.responder);
			
		}
		public function getAllEmployee(p:PaginationParas):void{
			var token:AsyncToken = serviceLocator.getRemoteObject("employeeService").listByPage(p.hql,p.paras,p.pageIndex,p.count);
			token.addResponder(this.responder);
		}
		
	}
}